package cn.sjx.graduate.web.anno;

import java.lang.annotation.*;

/**
 * @Author: bo-feifei
 * @Date 2021/11/10 20:45
 * @Version 1.0
 */
@Target({ ElementType.PARAMETER, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Log {
    public static final int BUSINESS_TYPE_OTHER = 0;
    public static final int BUSINESS_TYPE_INSERT = 1;
    public static final int BUSINESS_TYPE_UPDATE = 2;
    public static final int BUSINESS_TYPE_DELETE = 3;

    /**
     * 模块名称
     */
    String title() default "";

    /**
     * 功能类型
     */
    int businessType() default BUSINESS_TYPE_OTHER;

    /**
     * 是否保存请求的参数
     * PS：记录日志需要根据此参数来决定是否保存请求参数
     */
    boolean isSaveRequestData() default true;
}
